﻿using Models;
using Models.DTO;
using System;
using System.Collections.Generic;
using System.Text;

namespace IBLL
{
    // <summary>
    /// 菜单树对象
    /// </summary>
    public interface IMenuInfoBLL
    {
        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <param name="page">第几页</param>
        /// <param name="limit">每页几条数据</param>
        /// <param name="title">菜单标题</param>
        /// <param name="count">数据总数</param>
        /// <returns></returns>
        List<GetMenuInfosDTO> GetMenuInfos(int page, int limit, string title, out int count);

        /// <summary>
        ///  获取菜单列表的接口
        /// </summary>
        /// <returns></returns>
        List<GetMenuInfosDTO> GetMenuInfo();

        /// <summary>
        /// 返回父级菜单下拉列表数据(GetSelectOptions)
        /// </summary>
        /// <returns></returns>
        object GetSelectOptions();

        /// <summary>
        /// 新增菜单的接口
        /// </summary>
        /// <param name="menuInfo">新增的菜单实体</param>
        /// <param name="msg">返回的信息</param>
        /// <returns></returns>
        bool CreateMenuInfo(MenuInfo menuInfo, out string msg);

        /// <summary>
        /// 根据id获取详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        MenuInfo GetMenuInfoById(string id);

        /// <summary>
        /// 编辑/修改菜单的接口
        /// </summary>
        /// <param name="menuInfo">编辑的菜单实体</param>
        /// <param name="msg">返回的信息</param>
        /// <returns></returns>
        bool UpdateMenuInfo(MenuInfo menuInfo, out string msg);

        /// <summary>
        /// 菜单软删除的接口
        /// </summary>
        /// <param name="id">被删除的菜单id</param>
        /// <returns></returns>
        bool DeleteMenuInfo(string id);

        /// <summary>
        /// 菜单批量软删除的接口
        /// </summary>
        /// <param name="ids">被删除的菜单id集合</param>
        /// <returns></returns>
        bool DeleteMenuInfo(List<string> ids);

        /// <summary>
        /// 根据菜单，根据用户id
        /// </summary>
        /// <param name="userId">用户id</param>
        /// <returns></returns>
        List<HomeMenuInfoDTO> GetMenus(string userId);
    }
}
